package ooday03;

public class SwimTest {
    public static void main(String[] args) {
        Dog dog =new Dog("小黑",2,"黑");
        dog.eat();//Dog类重写之后
        dog.lookHome();//复用Animal类的
        dog.swim();//重写之后
        dog.drink();//Dog类所特有的
        Chick chick =new Chick("小白",1,"白");
        chick.eat();//Chick类重写之后
        chick.LayEggs();//Chick类所特有的
        chick.drink();
        Fish fish =new Fish("小金",1,"金");
        fish.eat(); //FIsh类重写之后的
        fish.drink();//复用Animal类的
        fish.swim();//Fish类重写之后的

        Swim swim =new Dog();
        swim.swim();
    }
}
